
package org.dev.app.first.poi.excel.parse.nocache.webwork;

import java.io.InputStream;

public class MutiExcelLoader implements ExcelLoader {

	private final ExcelLoader[] loaders;

	public MutiExcelLoader(ExcelLoader[] loaders) {
		this.loaders = (ExcelLoader[]) loaders.clone();
	}

	public InputStream getExcel(String location) {
		if (loaders != null && loaders.length > 0) {
			for (int i = 0; i < loaders.length; i++) {
				InputStream st = loaders[i].getExcel(location);
				if (st != null) {
					return st;
				}
			}
		}
		return null;
	}

}
